def Feature():
    print('欢迎来到学员管理系统')
    print('1.添加学员')
    print('2.删除学员')
    print('3.修改学学员信息')
    print('4.查询学员信息')
    print('5.显示所有学员信息')
    print('6.退出系统')


global info
info = []


def add():
    new_name = input('请输入姓名')
    new_gender = input('请输入性别')
    new_age = input('请输入年龄')
    for i in info:
        if new_name == i['name']:
            print('该用户名已经存在')
            return1

    info_dict = {}
    info_dict['name'] = new_name
    info_dict['gender'] = new_gender
    info_dict['age'] = new_age6
    info.append(info_dict)
    print(info)


def info_del():
    find_name = int(input('name'))
    global info
    for i in info:
        if find_name == i['name']:
            info.remove(i)
            break
    else:
        print('该学员不存在')
    print(info)


while True:
    Feature()
    num = int(input('请输入你需要执行的功能序号'))
    if num == 1:
        add()
    if num == 2:
        info_del()